﻿@using ZBJF.Warranty.Common.Enums
@using ZBJF.Warranty.Model
@using ZBJF.Warranty.WebProvider
@model ZBJF.Warranty.Model.SellersOrganization

<div class="page-header">
    <h4>
        销售机构管理
        <small>
            <i class="icon-double-angle-right"></i>
            <span id="ShowText">销售机构编辑</span>
        </small>
    </h4>
</div>
@using (Html.BeginForm("UpdateSellerOrganizationForm", "SellersOrganization", FormMethod.Post, new { id = "mvcForm", name = "mvcForm", @class = "form-horizontal", enctype = "multipart/form-data" }))
{
    @Html.HiddenFor(m => m.ID)
    <div class="control-group">
        <label class="control-label">销售机构名称:</label>
        <div class="controls">
            @Html.TextBoxFor(m => m.OrganizationName, new {maxlength=15, validate = "{required:true,messages:{required:'请输销售机构名称'}}"})
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">上级销售机构:</label>
        <div class="controls" id="PidSelect">
            <select class="chosen-select tag-input-style" id="ParentOrganizationId" name="ParentOrganizationId" data-placeholder="请选择所属页面">
                <option value="0">一级销售机构</option>
                @Html.Action("ShowMenuSelectList", "SellersOrganization", new { listPage = PageData["ItemList"], pid = 0, layer = 0 })
            </select>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">销售商类型:</label>
        <div class="controls">
            @Html.DropDownListFor(m => m.SellerType, ConvertToSelector.Instance.SellersTypeToSelectList(), new {validate = "{required:true,messages:{required:'请选择销售商类型'}}"})
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">排序:</label>
        <div class="controls">
            @Html.TextBoxFor(m => m.Sort, new {onkeyup = "onlyInputInt(this)", validate = "{required:true,digits:true,messages:{required:'请输入排序数字'}}"})
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">备注:</label>
        <div class="controls">
            @Html.TextAreaFor(m => m.Remark)
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">是否启用:</label>
        <div class="controls">
            <label>
                <input name="IsAvailable" type="radio" class="ace" value="true" checked="checked" />
                <span class="lbl">启用</span>
            </label>
            <label>
                <input name="IsAvailable" type="radio" class="ace" value="false" />
                <span class="lbl">不启用</span>
            </label>
        </div>
    </div>
    <div class="control-group">
        <div class="align-center">
            <button class="btn btn-primary Edit-R" type="submit">
                <i class="icon-ok bigger-110"></i>
                保存
            </button>
            <button class="btn" type="reset" data-dismiss="modal">
                <i class="icon-undo bigger-110"></i>
                取消
            </button>
        </div>
    </div>
}